import {
	MyRequest
} from '@/util/api.js'

//拿到所有的图片资源
export const GetALLImgInfo = () => MyRequest({
	url: '/wx/pcindexs/list',
	method: 'get'
})

//首页根据根据文章进行分类
export const GetIndexAllACtircle = (data) => MyRequest({
	url: '/wx/articles/indexlists',
	method: 'post',
	data
})
//获取浏览量
export const GetALLViews = (Articleid) => MyRequest({
	url: '/wx/articles/getView',
	method: 'get',
	params: {
		Articleid: Articleid
	}

})
// 浏览量增加
export const AllViews = (articleId) => MyRequest({
	url: `/wx/articles/addView/${articleId}`,
	method: 'get',

})
//根据文章id查询文章详情
export const LookTitleDetail = (Id) => MyRequest({
	url: `/wx/articles/detail/${Id}`,
	method: 'get'
})
//点赞并返回数量
export const Praise = (Articleid, status) => MyRequest({
	url: '/wx/articles/praise',
	method: 'GET',
	data: {
		Articleid: Articleid,
		status: status
	}
})
// 登录接口
export function login(code, password, phone, uuid) {
	return MyRequest({
		url: '/warmstill/user/user-tokens',
		method: 'post',
		data: {
			code: code,
			password: password,
			phone: phone,
			uuid: uuid
		}
	})
}
//退出登录
export const logout = (userId) => MyRequest({
	url: `/warmstill/user/logoutUser/${userId}`,
	method: 'get',

})
